<script>
    // 创建父类
    class Person{
        name = '小明';
        eat(){
            console.log('吃饭');
        }
    }
    // 创建子类，继承父类Person
    class Student extends Person{ }
    // 实例化子类
    let s1 = new Student;
    console.log(s1);
</script>